﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="Scripts/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="scripts/jquery-ui-1.8.custom.min.js"></script>
    <script type="text/javascript" src="EzDesk.Common.js"></script>
    <script type="text/javascript" src="Scripts/gserializer.js"></script>
    <script type="text/javascript" src="dhtmlxgantt.js"></script>
    <script type="text/javascript" src="dhtmlxgantt.ext.js"></script>
    <script type="text/javascript" src="TestData.js"></script>
    <link href="dhtmlxgantt.css" rel="stylesheet" type="text/css" />
    <link href="css/jquery-ui-1.8.custom.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        //Generate test data

        var ganttChartControl = new GanttChart();

        $(function () {
            var serverData = dataFromServer;
            ganttChartControl.panelDate = document.getElementById('dateCoordinateContainer');

            ganttChartControl.loadDataIn('GanttDiv', serverData);
            ganttChartControl.loadDataIn('GanttDiv', serverData);

            //            $("#ComboxBinding").comboxBinding(serverData.TeamMembers, "Name", "Id");
        }
        );
        var displayDialog = $('<div/>');
        function SaveToServer() {
            //do something
            var dataToServer = ganttChartControl.getServerData();

            var serializer = new ONEGEEK.GSerializer();
            var seriValue = serializer.serialize(dataToServer, "Plane", "");
            displayDialog.attr("innerHTML", seriValue).dialog();

        }
        function NewPlane() {
            ganttChartControl.addNewPlane();
        }
        function Refresh() {
            $('#GanttDiv').width(500);
            $('#GanttDiv').height(300);
            ganttChartControl.refresh();
        }
    </script>
</head>
<body>
    Simple read-only chart:
    <button value="Save" onclick="SaveToServer();">
        Save
    </button>
    <button value="Load" onclick="NewPlane();">
        添加阶段
    </button>
    <button value="Refresh" onclick="Refresh();">
        刷新
    </button>
    <select id="ComboxBinding">
    </select>
    <div style="width: 800px; height: 480px; position: relative;" id="GanttDiv">
        <div style="width: 800px; height: 480px; position: relative;" id="Div1">
        </div>
</body>
</html>
